package wangjg.game.layer;

import java.util.ArrayList;
import java.util.List;

public class LayerManager {
	private List<Layer> list = new ArrayList<Layer>();

	public LayerManager() {
	}

	public void append(Layer layer) {
		list.add(layer);
	}

	public int getSize() {
		return list.size();
	}

	public void remove(Layer layer) {
		list.remove(layer);
	}

	public void paint(Graphics graphics, int x, int y) {
		for (int i = 0; i<list.size();i++) {
			Layer layer = list.get(i);
			layer.paint(graphics);
		}
	}
}
